#!/bin/bash
# if error in pip, return code is non-zero
set -o pipefail
if xinput --list|grep "AT Translated"|awk '{print $7}' > keyboardID.txt
then
    Temp=$(cat keyboardID.txt)
    KeyBoardID=${Temp:3}
    echo $KeyBoardID
    xinput set-prop "$KeyBoardID" "Device Enabled" 0
    rm keyboardID.txt
else
    echo "Error: Can't get keyboard id"
    exit 1
fi

